<div xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ice="http://www.icesoft.com/icefaces/component">
	
	<ui:composition
	template="/admin/metering/meteringTemplate.xhtml">
	<ui:define name="Sources of Options">
		<ice:panelGroup>
			<ice:outputLabel for="SlctOption" value="Options" />
			<ice:selectOneListbox id="SlctOption"
				value="#{meteringMainBean.selectIpRangeOption}" partialSubmit="true"
				style="overflow: auto;height:75px"
				valueChangeListener="#{meteringMainBean.ipRangeOptionChangeListener}">
				<f:selectItems id="SlctOptionItms"
					value="#{meteringMainBean.ipRangeOptions}" />
			</ice:selectOneListbox>
			<!--set true, refresh and reset before make a new selection  -->
			<ice:selectOneListbox id="SourcesListBox" partialSubmit="true"
				value="#{meteringMainBean.selectIpRangeSource}"
				style="overflow: auto;width:110px;height:75px"
				valueChangeListener="#{meteringMainBean.ipRangeSourceChangeListener}">
				<f:selectItems id="SlctCtyItms"
					value="#{meteringMainBean.ipRangeSources}" />
			</ice:selectOneListbox>

			<ice:commandButton value="Save"
				action="#{meteringMainBean.saveIpRangOptionWithIpRangeSource}"
				disabled="#{!meteringMainBean.ipRangeSourceValueReassigned}" />
			<ice:commandButton value="Cancel"
				action="#{meteringMainBean.cancelIpRangOptionWithIpRangeSource}"
				disabled="#{!meteringMainBean.ipRangeSourceValueReassigned}"
				immediate="false" />
		</ice:panelGroup>
	</ui:define>
	
	<ui:define name="Refresh Rate">
		<ice:panelGroup binding="#{meteringMainBean.refreshRatePanel}">
			<ice:outputLabel value="Refresh Rate" />
			<ice:inputText value="#{meteringMainBean.refreshRate}"
				id="Refresh_rate"
				valueChangeListener="#{meteringMainBean.refreshRateChangeListener}"
				partialSubmit="true">
				<f:validateDoubleRange minimum="0.00" />
			</ice:inputText>
			<ice:commandButton value="SAVE"
				action="#{meteringMainBean.saveRefreshRate}"
				disabled="#{!meteringMainBean.enableRefreshRateSave}" />
			<ice:commandButton value="CANCEL"
				action="#{meteringMainBean.cancelRefreshRateChange}"
				disabled="#{!meteringMainBean.enableRefreshRateSave}"
				immediate="true" />
		</ice:panelGroup>
	</ui:define>
	
	<ui:define name="Router">
		<ice:panelGrid binding="#{meteringMainBean.routerConfigPanel}">
			<ice:panelGroup>
				<ice:outputLabel value="Address Remote" />
				<ice:inputText value="#{meteringMainBean.address_router_remote}"
					valueChangeListener="#{meteringMainBean.remoteRouterAddressConfigValueChangeListener}"
					partialSubmit="true"></ice:inputText>
			</ice:panelGroup>
			<ice:panelGroup>
				<ice:outputLabel value="Address Local" />
				<ice:inputText value="#{meteringMainBean.address_router_local}"
					valueChangeListener="#{meteringMainBean.localRouterAddressConfigValueChangeListener}"
					partialSubmit="true"></ice:inputText>
			</ice:panelGroup>
			<ice:panelGroup>
				<ice:outputLabel value="Port Remote" />
				<ice:inputText value="#{meteringMainBean.port_router_remote}"
					id="Port_Remote"
					valueChangeListener="#{meteringMainBean.port_router_remoteConfigValueChangeListener}"
					partialSubmit="true">
					<f:validateLongRange minimum="0" maximum="255"></f:validateLongRange>
				</ice:inputText>
			</ice:panelGroup>
			<ice:panelGroup>
				<ice:outputLabel value="Port Local" />
				<ice:inputText value="#{meteringMainBean.port_router_local}"
					id="Port_Local"
					valueChangeListener="#{meteringMainBean.port_router_localConfigValueChangeListener}"
					partialSubmit="true">
					<f:validateLongRange minimum="0" maximum="255"></f:validateLongRange>
				</ice:inputText>
			</ice:panelGroup>
			<ice:panelGroup>
				<ice:outputLabel value="SNMP Remote" />
				<ice:inputText value="#{meteringMainBean.snmp_router_remote}"
					valueChangeListener="#{meteringMainBean.snmp_router_remoteConfigValueChangeListener}"
					partialSubmit="true"></ice:inputText>
			</ice:panelGroup>
			<ice:panelGroup>
				<ice:outputLabel value="SNMP Local" />
				<ice:inputText value="#{meteringMainBean.snmp_router_local}"
					valueChangeListener="#{meteringMainBean.snmp_router_localConfigValueChangeListener}"
					partialSubmit="true"></ice:inputText>
			</ice:panelGroup>
			<ice:panelGroup>
				<ice:commandButton value="SAVE"
					action="#{meteringMainBean.saveRouterConfig}"
					disabled="#{!meteringMainBean.enableRouteConfigSave}" />
				<ice:commandButton value="CANCEL"
					action="#{meteringMainBean.cancelRouterConfigChange}"
					disabled="#{!meteringMainBean.enableRouteConfigSave}"
					immediate="true" />
			</ice:panelGroup>
		</ice:panelGrid>

	</ui:define>
	<ui:define name="File">
		<ice:panelGrid binding="#{meteringMainBean.filePathConfigPanel}">
			<ice:outputLabel value="Local" />
			<ice:inputText value="#{meteringMainBean.localfile_path}"
				valueChangeListener="#{meteringMainBean.localfilepathConfigValueCHangeListener}"
				partialSubmit="true"></ice:inputText>
			<ice:outputLabel value="Remote" />
			<ice:inputText value="#{meteringMainBean.remotefile_path}"
				valueChangeListener="#{meteringMainBean.remotefilepathConfigValueCHangeListener}"
				partialSubmit="true" />
			<ice:panelGroup>
				<ice:commandButton value="SAVE"
					action="#{meteringMainBean.saveFilePathConfig}"
					disabled="#{!meteringMainBean.enableFilepathSave}" />
				<ice:commandButton value="CANCEL"
					action="#{meteringMainBean.cancelFilePathConfigChange}"
					disabled="#{!meteringMainBean.enableFilepathSave}" immediate="true" />
			</ice:panelGroup>
		</ice:panelGrid>
	</ui:define>
	</ui:composition>
</div>

